/**
 * @description 音频、视频播放-类及图片预览的类
 * @VideoES 视频基类
 * @AudioES 音频基类
 * @ImgPreview 图片预览类
 */

export class VideoES {

    video: HTMLVideoElement | null = null

    constructor(src: string) {
        if (VideoES) {
            this.video = document.createElement('video')
            this.video.src = src
        }
    }

    play = this.video!.play

    pause = this.video!.pause

}

export class AudioES {
    audio: HTMLAudioElement | null = null
    constructor(src: string) {
        if (VideoES) {
            this.audio = document.createElement('audio')
            this.audio.src = src
        }
    }

    play = this.audio!.play

    pause = this.audio!.pause
}

export class ImgPreview {
    src: string | null = null
    constructor(src: string) {
        if (ImgPreview) {
            // 预览
        }
    }
}
